package com.taku.controller;

import com.taku.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author: taku
 * @CreateTime: 2020-05-18 12:31
 * @Description:
 */
@Controller
@RequestMapping
public class MyController {

    @Autowired
    private UserService userService;

    @GetMapping("/list")
    @ResponseBody
    public List show() {
        List all = userService.findAll();
        System.out.println("hshs");
        return all;
    }
}
